import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

let cityname = localStorage.getItem('city')
console.log(cityname)
const state={
    city:cityname==null?'上海':cityname
}
const mutations ={
    editcityname(state,name){
        this.state.city = name
    }
}

export default new Vuex.Store({
    state,
    mutations
})